<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_robots: /workspace/software/workspace/src/catkin/robots/blmc_robots/include/blmc_robots/single_motor.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_robots
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('single__motor_8hpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">single_motor.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="single__motor_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef SingleMotor_H</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define SingleMotor_H</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="common__header_8hpp.html">blmc_robots/common_header.hpp</a>&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="blmc__joint__module_8hpp.html">blmc_robots/blmc_joint_module.hpp</a>&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="slider_8hpp.html">blmc_robots/slider.hpp</a>&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceblmc__robots.html">blmc_robots</a>{</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html">   19</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__robots_1_1SingleMotor.html">SingleMotor</a></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <span class="keyword">typedef</span> Eigen::Matrix&lt;double, 1, 1&gt; Vector1d;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <span class="keyword">typedef</span> Eigen::Matrix&lt;double, 1, 1&gt; VectorSlider;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  <a class="code" href="classblmc__robots_1_1SingleMotor.html#a074ba2d9a982316a4aecac65b7c1b581">SingleMotor</a>();</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classblmc__robots_1_1SingleMotor.html#a2c547957aec36d6cbd02ead4882558d4">initialize</a>();</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classblmc__robots_1_1SingleMotor.html#a2fa43cd18da7598b8a41da66ef9251ff">send_target_motor_current</a>(</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; target_motor_current);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classblmc__robots_1_1SingleMotor.html#a09a829c726847cf4e8fd34175ce1a139">send_target_joint_torque</a>(</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; target_joint_torque);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classblmc__robots_1_1SingleMotor.html#adbc3fb18b62ee085ff2d4d6bb2f107a4">acquire_sensors</a>();</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#ac72b1daab642097f739ccdcb8388d6c9">   59</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#ac72b1daab642097f739ccdcb8388d6c9">get_motor_positions</a>()</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">return</span> motor_positions_;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  }</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a8ee1b2b7d9b5bf83cd43511836e6074a">   68</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a8ee1b2b7d9b5bf83cd43511836e6074a">get_motor_velocities</a>()</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">return</span> motor_velocities_;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#ab3330ea642ca97c094f2af7b50a7a747">   77</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#ab3330ea642ca97c094f2af7b50a7a747">get_motor_currents</a>()</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">return</span> motor_currents_;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  }</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#af48038f9bc14cb4971d3f1aa54573daf">   86</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#af48038f9bc14cb4971d3f1aa54573daf">get_motor_target_currents</a>()</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  {</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">return</span> motor_target_currents_;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a375565046712276a1f3bd941078a44fb">   95</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a375565046712276a1f3bd941078a44fb">get_motor_torques</a>()</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> motor_torques_;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a5fe1f45ebb4893b1b31e1f0f23fb48e2">  104</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a5fe1f45ebb4893b1b31e1f0f23fb48e2">get_target_motor_torques</a>()</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> motor_target_torques_;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a7126966be33a93491dcf10d62f711768">  113</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a7126966be33a93491dcf10d62f711768">get_motor_inertias</a>()</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  {</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">return</span> motor_inertias_;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  }</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a1a7ff027c499ed3fc164a399e5b498e1">  122</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a1a7ff027c499ed3fc164a399e5b498e1">get_motor_encoder_indexes</a>()</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  {</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordflow">return</span> motor_encoder_indexes_;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  }</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#ac368bb72104b1a2e076142d4002740fb">  131</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#ac368bb72104b1a2e076142d4002740fb">get_motor_torque_constants</a>()</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  {</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">return</span> motor_torque_constants_;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a4d458d18608fbca78baf6331d27a431b">  140</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a4d458d18608fbca78baf6331d27a431b">get_joint_positions</a>()</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  {</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordflow">return</span> joint_positions_;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  }</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a9a2997aaadecda0b30530d8d5afeaddf">  149</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a9a2997aaadecda0b30530d8d5afeaddf">get_joint_velocities</a>()</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  {</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordflow">return</span> joint_velocities_;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  }</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a7ac6ae993e59e6f2ea5f83a643184a9e">  158</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a7ac6ae993e59e6f2ea5f83a643184a9e">get_joint_torques</a>()</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  {</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="keywordflow">return</span> joint_torques_;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  }</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a261200917e713211fa7652b1157eafa1">  167</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a261200917e713211fa7652b1157eafa1">get_joint_target_torques</a>()</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;  {</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keywordflow">return</span> joint_target_torques_;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  }</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a8ec5c8ba70bc93ff728300e868755546">  176</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a8ec5c8ba70bc93ff728300e868755546">get_joint_gear_ratios</a>()</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;  {</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">return</span> joint_gear_ratios_;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#ab73b8091a40e846a1b6c08ac1d8e0db8">  185</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#ab73b8091a40e846a1b6c08ac1d8e0db8">get_joint_encoder_index</a>()</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keywordflow">return</span> joint_encoder_index_;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  }</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a3a753c2c1b7b82bd716caa4fc3b5f5f0">  194</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a3a753c2c1b7b82bd716caa4fc3b5f5f0">get_zero_positions</a>()</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  {</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keywordflow">return</span> joint_zero_positions_;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  }</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a9c0f3d4686e13d2a8a668a8c26f0bd00">  203</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a9c0f3d4686e13d2a8a668a8c26f0bd00">get_slider_positions</a>()</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  {</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordflow">return</span> slider_positions_;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  }</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#a5768cce6fef657b36648ea68fdbb3ed8">  213</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#a5768cce6fef657b36648ea68fdbb3ed8">get_max_current</a>()</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  {</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="keywordflow">return</span> motor_max_current_;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#af83ef444bdd1eebdac1df6d8035d2b75">  223</a></span>&#160;  <span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; <a class="code" href="classblmc__robots_1_1SingleMotor.html#af83ef444bdd1eebdac1df6d8035d2b75">get_max_joint_torque</a>()</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  {</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <span class="keywordflow">return</span> joint_max_torque_;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  }</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classblmc__robots_1_1SingleMotor.html#af2add59e3d08949c658568b6d161b5ba">  233</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classblmc__robots_1_1SingleMotor.html#af2add59e3d08949c658568b6d161b5ba">set_max_current</a>(<span class="keyword">const</span> Eigen::Ref&lt;Vector1d&gt; max_current)</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  {</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    motor_max_current_ = max_current;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> i=0 ; i&lt;motors_.size() ; ++i)</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    {</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;      motors_[i]-&gt;set_max_current(motor_max_current_(i));</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    joint_max_torque_ = motor_max_current_.array() *</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                        motor_torque_constants_.array() *</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                        joint_gear_ratios_.array();</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  }</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  Vector1d motor_positions_;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;  Vector1d motor_velocities_;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;  Vector1d motor_currents_;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;  Vector1d motor_torques_;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;  Vector1d motor_inertias_;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  Vector1d motor_encoder_indexes_;</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  Vector1d motor_target_currents_;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  Vector1d motor_target_torques_;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  Vector1d motor_torque_constants_;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  Vector1d target_motor_current_tmp_;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  Vector1d joint_positions_;</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  Vector1d joint_velocities_;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;  Vector1d joint_torques_;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  Vector1d joint_target_torques_;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  Vector1d joint_gear_ratios_;</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;  Vector1d joint_encoder_index_;</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;  Vector1d joint_zero_positions_;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;  Vector1d joint_max_torque_;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;  Vector1d slider_positions_;</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  Vector1d motor_max_current_;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;  std::array&lt;CanBus_ptr, 1&gt; can_buses_;</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;  std::array&lt;CanBusMotorBoard_ptr, 1&gt; can_motor_boards_;</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;  std::array&lt;SafeMotor_ptr, 1&gt; motors_;</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;  std::array&lt;Slider_ptr, 1&gt; sliders_;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;};</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;} <span class="comment">// namespace blmc_robots</span></div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<span class="preprocessor">#endif // SingleMotor_H</span></div><div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a8ec5c8ba70bc93ff728300e868755546"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a8ec5c8ba70bc93ff728300e868755546">blmc_robots::SingleMotor::get_joint_gear_ratios</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_joint_gear_ratios()</div><div class="ttdoc">get_joint_gear_ratios </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:176</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_af83ef444bdd1eebdac1df6d8035d2b75"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#af83ef444bdd1eebdac1df6d8035d2b75">blmc_robots::SingleMotor::get_max_joint_torque</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_max_joint_torque()</div><div class="ttdoc">get_max_torque </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:223</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a375565046712276a1f3bd941078a44fb"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a375565046712276a1f3bd941078a44fb">blmc_robots::SingleMotor::get_motor_torques</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_torques()</div><div class="ttdoc">get_motor_torques </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:95</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_af48038f9bc14cb4971d3f1aa54573daf"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#af48038f9bc14cb4971d3f1aa54573daf">blmc_robots::SingleMotor::get_motor_target_currents</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_target_currents()</div><div class="ttdoc">get_motor_target_currents </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:86</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a3a753c2c1b7b82bd716caa4fc3b5f5f0"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a3a753c2c1b7b82bd716caa4fc3b5f5f0">blmc_robots::SingleMotor::get_zero_positions</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_zero_positions()</div><div class="ttdoc">get_zero_positions </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:194</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_ab73b8091a40e846a1b6c08ac1d8e0db8"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#ab73b8091a40e846a1b6c08ac1d8e0db8">blmc_robots::SingleMotor::get_joint_encoder_index</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_joint_encoder_index()</div><div class="ttdoc">get_joint_encoder_index </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:185</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_ab3330ea642ca97c094f2af7b50a7a747"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#ab3330ea642ca97c094f2af7b50a7a747">blmc_robots::SingleMotor::get_motor_currents</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_currents()</div><div class="ttdoc">get_motor_currents </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:77</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_ac368bb72104b1a2e076142d4002740fb"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#ac368bb72104b1a2e076142d4002740fb">blmc_robots::SingleMotor::get_motor_torque_constants</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_torque_constants()</div><div class="ttdoc">get_motor_torque_constants </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:131</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a5768cce6fef657b36648ea68fdbb3ed8"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a5768cce6fef657b36648ea68fdbb3ed8">blmc_robots::SingleMotor::get_max_current</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_max_current()</div><div class="ttdoc">get_max_current </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:213</div></div>
<div class="ttc" id="slider_8hpp_html"><div class="ttname"><a href="slider_8hpp.html">slider.hpp</a></div></div>
<div class="ttc" id="blmc__joint__module_8hpp_html"><div class="ttname"><a href="blmc__joint__module_8hpp.html">blmc_joint_module.hpp</a></div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html">blmc_robots::SingleMotor</a></div><div class="ttdef"><b>Definition:</b> single_motor.hpp:19</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a2fa43cd18da7598b8a41da66ef9251ff"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a2fa43cd18da7598b8a41da66ef9251ff">blmc_robots::SingleMotor::send_target_motor_current</a></div><div class="ttdeci">void send_target_motor_current(const Eigen::Ref&lt; Vector1d &gt; target_motor_current)</div><div class="ttdoc">send_target_torques sends the target currents to the motors </div><div class="ttdef"><b>Definition:</b> single_motor.cpp:144</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_ac72b1daab642097f739ccdcb8388d6c9"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#ac72b1daab642097f739ccdcb8388d6c9">blmc_robots::SingleMotor::get_motor_positions</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_positions()</div><div class="ttdoc">get_motor_positions </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:59</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a5fe1f45ebb4893b1b31e1f0f23fb48e2"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a5fe1f45ebb4893b1b31e1f0f23fb48e2">blmc_robots::SingleMotor::get_target_motor_torques</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_target_motor_torques()</div><div class="ttdoc">get_target_motor_torques </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:104</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a9c0f3d4686e13d2a8a668a8c26f0bd00"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a9c0f3d4686e13d2a8a668a8c26f0bd00">blmc_robots::SingleMotor::get_slider_positions</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_slider_positions()</div><div class="ttdoc">get_slider_positions </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:203</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a4d458d18608fbca78baf6331d27a431b"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a4d458d18608fbca78baf6331d27a431b">blmc_robots::SingleMotor::get_joint_positions</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_joint_positions()</div><div class="ttdoc">get_joint_positions </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:140</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a2c547957aec36d6cbd02ead4882558d4"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a2c547957aec36d6cbd02ead4882558d4">blmc_robots::SingleMotor::initialize</a></div><div class="ttdeci">void initialize()</div><div class="ttdoc">initialize the robot by setting aligning the motors and calibrate the sensors to 0 ...</div><div class="ttdef"><b>Definition:</b> single_motor.cpp:54</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_af2add59e3d08949c658568b6d161b5ba"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#af2add59e3d08949c658568b6d161b5ba">blmc_robots::SingleMotor::set_max_current</a></div><div class="ttdeci">void set_max_current(const Eigen::Ref&lt; Vector1d &gt; max_current)</div><div class="ttdoc">set_max_current sets the maximum current that the motor can to apply. </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:233</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a9a2997aaadecda0b30530d8d5afeaddf"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a9a2997aaadecda0b30530d8d5afeaddf">blmc_robots::SingleMotor::get_joint_velocities</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_joint_velocities()</div><div class="ttdoc">get_joint_velocities </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:149</div></div>
<div class="ttc" id="common__header_8hpp_html"><div class="ttname"><a href="common__header_8hpp.html">common_header.hpp</a></div><div class="ttdoc">The hardware wrapper of the quadruped. </div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a261200917e713211fa7652b1157eafa1"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a261200917e713211fa7652b1157eafa1">blmc_robots::SingleMotor::get_joint_target_torques</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_joint_target_torques()</div><div class="ttdoc">get_joint_torques </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:167</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_adbc3fb18b62ee085ff2d4d6bb2f107a4"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#adbc3fb18b62ee085ff2d4d6bb2f107a4">blmc_robots::SingleMotor::acquire_sensors</a></div><div class="ttdeci">void acquire_sensors()</div><div class="ttdoc">acquire_sensors acquire all available sensors, WARNING !!!! this method has to be called prior to any...</div><div class="ttdef"><b>Definition:</b> single_motor.cpp:81</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a1a7ff027c499ed3fc164a399e5b498e1"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a1a7ff027c499ed3fc164a399e5b498e1">blmc_robots::SingleMotor::get_motor_encoder_indexes</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_encoder_indexes()</div><div class="ttdoc">get_motor_encoder_indexes </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:122</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a8ee1b2b7d9b5bf83cd43511836e6074a"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a8ee1b2b7d9b5bf83cd43511836e6074a">blmc_robots::SingleMotor::get_motor_velocities</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_velocities()</div><div class="ttdoc">get_motor_velocities </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:68</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a09a829c726847cf4e8fd34175ce1a139"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a09a829c726847cf4e8fd34175ce1a139">blmc_robots::SingleMotor::send_target_joint_torque</a></div><div class="ttdeci">void send_target_joint_torque(const Eigen::Ref&lt; Vector1d &gt; target_joint_torque)</div><div class="ttdoc">send_target_torques sends the target currents to the motors </div><div class="ttdef"><b>Definition:</b> single_motor.cpp:160</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a7ac6ae993e59e6f2ea5f83a643184a9e"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a7ac6ae993e59e6f2ea5f83a643184a9e">blmc_robots::SingleMotor::get_joint_torques</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_joint_torques()</div><div class="ttdoc">get_joint_torques </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:158</div></div>
<div class="ttc" id="namespaceblmc__robots_html"><div class="ttname"><a href="namespaceblmc__robots.html">blmc_robots</a></div><div class="ttdef"><b>Definition:</b> blmc_joint_module.cpp:15</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a7126966be33a93491dcf10d62f711768"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a7126966be33a93491dcf10d62f711768">blmc_robots::SingleMotor::get_motor_inertias</a></div><div class="ttdeci">const Eigen::Ref&lt; Vector1d &gt; get_motor_inertias()</div><div class="ttdoc">get_motor_inertias </div><div class="ttdef"><b>Definition:</b> single_motor.hpp:113</div></div>
<div class="ttc" id="classblmc__robots_1_1SingleMotor_html_a074ba2d9a982316a4aecac65b7c1b581"><div class="ttname"><a href="classblmc__robots_1_1SingleMotor.html#a074ba2d9a982316a4aecac65b7c1b581">blmc_robots::SingleMotor::SingleMotor</a></div><div class="ttdeci">SingleMotor()</div><div class="ttdoc">SingleMotor is the constructor of the class. </div><div class="ttdef"><b>Definition:</b> single_motor.cpp:6</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_80e6cdd9bbc895bd262b4f65e652822c.html">catkin</a></li><li class="navelem"><a class="el" href="dir_b7f9efe3285d4a585ae30572be0808b1.html">robots</a></li><li class="navelem"><a class="el" href="dir_ee86b8bcb6635cb36ad14bd888f09517.html">blmc_robots</a></li><li class="navelem"><a class="el" href="dir_ff3606c6e0aa43abff10c4365bd5a19c.html">include</a></li><li class="navelem"><a class="el" href="dir_c66acd4681b95343b3d51cde3fc288b6.html">blmc_robots</a></li><li class="navelem"><a class="el" href="single__motor_8hpp.html">single_motor.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
